package com.net.xpay.common.manager.stat;

import com.net.common.manager.DomainManager;
import com.net.xpay.common.domain.stat.PartnerUserDayStat;
import com.net.xpay.common.model.PartnerUserDayStatModel;
import com.net.xpay.common.model.PartnerUserMonthStatModel;
import com.net.xpay.common.model.PartnerUserSumModel;
import com.net.xpay.common.model.search.PartnerUserDayStatSearchModel;

import java.time.LocalDate;
import java.util.List;


public interface PartnerUserDayStatManager extends DomainManager<Long,PartnerUserDayStat> {
    /**
     * 尝试通过时间加id获取数据
     * @param day
     * @param userId
     * @return
     */
    PartnerUserDayStat findByDayAndUserId(LocalDate day, Long userId);

    List<PartnerUserDayStatModel> aggSearch(PartnerUserDayStatSearchModel searchModel);

    long aggSearchCount(PartnerUserDayStatSearchModel searchModel);

    PartnerUserMonthStatModel sumPartnerUserDayStatInfo(Long partnerId, LocalDate minDay, LocalDate maxDay);

    PartnerUserSumModel aggSum(PartnerUserDayStatSearchModel searchModel);
}
